<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>




  <title>About COID</title>
</head>


<body style="color: rgb(80, 0, 0); background-color: rgb(255, 255, 240);" alink="#000099" link="#500000" vlink="#990099">


<div style="text-align: center;">
<h1 style="text-align: center;">About COID</h1>


<br>


<div style="text-align: left;">
<h3>Features</h3>


<br>


<ul>


  <li>


    <p>The generator tool (coidgen) generates everything needed for
remote method invocation on objects of given class. It uses <a href="../generating_communication_layer.html#Keywords">additional
keywords</a> in the declaration of class to produce both client-side
wrapper and server-side dispatcher. Additional control keywords,
defined as empty preprocessor symbols, are used to mark the direction
of method parameters (in, out, inout) and desired access modes.</p>


  </li>


  <li>Any types can be used for method arguments, given that they don't
collide
with the parameter <a href="../function_argument_format.html">direction</a>.
Actual arguments are transfered using
abstract stream class <a href="../binstream.html">binstream</a>.
This stream class has specializations for network tcp and udp streams,
file and memory streams, encoding and text formatting stream wrappers
and more. To be able to use a custom type in the parameters of class
methods, one must write just the <span style="font-family: monospace;">&lt;&lt;</span>
and <span style="font-family: monospace;">&gt;&gt;</span> operators
from
this type to (and from) binstream.<br>


  </li>


  <li>


    <p>COID implements versioning of classes it exposes. There can
exist multiple versions of the same class (service) and the server
correctly detects incompatibilities and links together the right
versions of client and dispatcher. The generator automatically detects
changes to definition of methods and updates the <a href="../version.html">version</a> accordingly.<br>


    </p>


  </li>


  <li>


    <p>Server automatically detects whether the client is on the same
machine or even in the same process, and chooses optimal connection -
interprocess communication or direct binding of client to server-side
implementation. The direct method binding is equivalent to virtual
method calls (with mutex locking). Instantiation of service classes can
be determined by
required access mode (remote/interprocess/direct). <br>


    </p>


  </li>


  <li>


    <p>Network frontend for tcp connections. Objects can be created
when the framework receives a new connection at specified network port.
Object will be called to process the connection. The objects will be
reused for connectionless (one-shot) requests and created on the fly if
needed.</p>


  </li>


  <li>Transparent http tunneling of the COID protocol, with support for
proxy.<br>


  </li>


</ul>


<ul>


  <li>Remote admin console. The console service itself is implemented
as COID-extended object (a service). Since the COID objects in the
remote mode communicate using abstract binstream class, the console
service utilizes txtparstream specialization of binstream to be able to
create objects from the console, bind to existing objects, call objects
methods etc. The text stream adapter converts input and output data to
text on the fly without objects (service instances) even knowing that
they have been called from console.<br>


  </li>


</ul>


Screenshot of an example class declaration decorated with coid keywords:<br>


<br>


<a href="http://coid.sourceforge.net/web/coid2.png"><img style="border: 2px solid ; width: 160px; height: 120px;" alt="header file screenshot" src="coid2thumb.png"></a><br>


<span style="font-weight: bold;"><br>


<br>


Features in development</span><br>


<br>


</div>


<div style="text-align: left;"><span style="font-style: italic;">XML Gateway </span>-
COID served C++ classes will be usable directly as backend servers for
AJAX technique applications. Currently there's a simple http service
that is used for http tunneling. We are extending this service and
adding metastream capabilities to coid/comm library, for COID
to&nbsp;serve as a gateway for XMLHttpRequest calls from browsers. No
special handling required by your code, a XMLHttpRequest call will get
translated directly to a method call.<br>

<br>

<span style="font-style: italic;">In-browser console</span> - Using the
AJAX technique, a web application that connects to the coid server and
allows to inspect the server and&nbsp;services, create and destroy
managed objects, call methods of running services and so on.<br>

<span style="font-style: italic;"><br>

Interfaces</span>
- in addition to default 'interface' exposed by the class (all its
methods form the default class interface), a specific interface (a
subset) can be implemented by the service and requested from a client.
The interface is defined as a virtual base class, extended with
COID-required keywords. Applications or other services can bind to
various different objects using one interface client class, given that
the objects implement the interface.<br>


<br>


<span style="font-style: italic;">Access specifiers</span> - a client
may be given different interface in dependence on authentification or
application specific processing. For example, client that authentifies
itself as anonymous can be given interface with only the read-only
methods (<span style="font-family: monospace;">const</span> methods in
class) present. The methods that modify the object (non-const ones) are
replaced with universal method that either returns or throws <span style="font-family: monospace;">ersDENIED</span> error object. This
works for both direct and remote access. What methods are accessible in
the interface can be determined not only by the const-ness, but also by
custom flags. Generally, method is accessible in the client if the
authentified client has all flags set that are specified as required
for accessing the method.<br>


<br>


</div>


</div>


</body>
</html>
